package com.hksj.dpm.controller;

import com.hksj.base.query.BaseRecordQuery;
import com.hksj.dpm.service.DpmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@Api(tags = "压差监测-设备列表")
@RestController
@RequestMapping("/api/dpm/device")
public class DpmDeviceController {
    @Autowired
    private DpmService dpmService;

    @ApiOperation(value = "设备列表-导出上报历史记录(压力)")
    @PostMapping("/exportRecord")
    public void exportRecord(@RequestBody @Validated BaseRecordQuery query, HttpServletResponse response){
        dpmService.exportRecord(query,response);
    }
}
